import { createElement } from 'react'
import { render } from 'react-dom'
// const { createElement } = require('react')
// const { render } = require('react-dom')

// createElement(结构名称,属性,子节点)  创建react元素

//render(react元素,拦截元素,callback)
const oSpan = createElement('span', {}, '--456')
const oDiv = createElement('div', {
    className: 'box'
}, ['123', oSpan])
render(oDiv, document.getElementById('root'), () => {
    console.log('拦截成功');
})